#ifndef _SERVER_H_
#define _SERVER_H_

#include <cstdio>
#include <time.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <map>
#include <string>

#include "connection.h"

class Server {

public:

	Server (unsigned int port_number);
	~Server ();

	int Run ();

private:

	fd_set read_set, write_set, whole_set;
	int serv_socket, max_socket;

	std::map<int, Connection*> connections;

};

#endif
